import './assets/css/index.scss'

import { createApp } from 'vue'

import ElementPlus from 'element-plus'
import 'element-plus/theme-chalk/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import { setupStore } from '@/store'

import App from './App.vue'
import router from '@/router'
import '@/router/permission'

// svg图标
import 'virtual:svg-icons-register'

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

// 全局注册 状态管理(store)
setupStore(app)

app.use(router).use(ElementPlus).mount('#app')
